// 导入静态路由表
import { constantRoutes } from '@/router'
const getDefaultState = () => {
  return {
    routes: constantRoutes // 默认静态路由
  }
}

const state = getDefaultState()

const mutations = {
  setRoutes(state, asyncRoutes) {
    state.routes = [...constantRoutes, ...asyncRoutes]
  }
}

export default {
  namespaced: true,
  state,
  mutations
}
